package com.cungmua.app.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.cungmua.app.fragment.PlaceSlideFragment;

import java.util.List;

/**
 * Created by kelvin.nguyen on 6/25/14.
 */
public class PlaceSlidesFragmentAdapter extends FragmentPagerAdapter {
    List<String> images;

    public PlaceSlidesFragmentAdapter(FragmentManager fm, List<String> images) {
        super(fm);
        this.images = images;
    }

    @Override
    public Fragment getItem(int position) {
        return PlaceSlideFragment.newInstance(images.get(position));
    }

    @Override
    public int getCount() {
        return images.size();
    }
}
